package com.lemon.smartsafety.ui.adapter.common;

import android.view.View;
import android.widget.LinearLayout;

import com.lemon.smartsafety.R;
import com.lemon.smartsafety.app.AppService;
import com.lemon.smartsafety.entity.common.EvidenceItemVo;
import com.lemon.smartsafety.entity.event.evidence.EvidencePlusEvent;

import cn.finalteam.galleryfinal.model.PhotoInfo;
import kale.adapter.item.AdapterItem;

/**
 * Created by Cooliean on 16/2/25.
 * 添加
 */
public class SelectEvidenceItemAdd implements AdapterItem<EvidenceItemVo<PhotoInfo>> {
    private LinearLayout mRippleLayout;

    private String mAddEventTag = "";

    public SelectEvidenceItemAdd(String addEventTag) {
        this.mAddEventTag = addEventTag;
    }

    @Override
    public int getLayoutResId() {
        return R.layout.item_evidence_add;
    }

    @Override
    public void bindViews(View root) {
        mRippleLayout = (LinearLayout) root.findViewById(R.id.ripple);
    }

    @Override
    public void setViews() {
        mRippleLayout.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                EvidencePlusEvent event = new EvidencePlusEvent();
                event.setTag(mAddEventTag);
                AppService.getBus().post(event);
            }
        });
    }

    @Override
    public void handleData(EvidenceItemVo<PhotoInfo> evidenceItemVo, int position) {

    }
}
